const log4js=require('log4js');

log4js.configure({
	appenders: {
		request:  { type: 'file', filename: 'logs/request.log', maxLogSize: 10485760, backups: 3, compress: true },
		error:  { type: 'file', filename: 'logs/error.log', maxLogSize: 10485760, backups: 3, compress: true },
	},
	categories: {
		default: { appenders: [ 'request' ], level: 'debug' },
		error: { appenders: [ 'error' ], level: 'error' },
	}
});

export default log4js;
